<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8">
    <title>Document</title>
  </head>
  <body>
    <script>
      var obj = {
        'name-age': '小明-18'
      };
      console.log(obj['name-age']);	  // 输出结果：“小明-18”
    </script>
  </body>
</html>